<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h1>{{msg}}</h1>
      <lk-box v-show="isShow"></lk-box>
    </div>
    <template id="box">
      <div style="background-color: bisque; width: 200px; height: 200px; margin: 20px;">
        <button v-show="isShow">聊天一下</button>
      </div>
      
    </template>

    <script src="../js/vue.js"></script>

    <script>
      const LKBox = {
        data(){
          return {
            isShow:true,
            msg:'哈哈哈'
          }
        },
        template:'#box'
      };
      const app = Vue.createApp({
        data() {
          return {
            isShow: true
          }
        },
        components:{
          'lk-box':LKBox
        }
      }).mount("#app");
    </script>
  </body>
</html>